import axios from '@/utils/axios'

export function getTeacherPage(params) {
  return axios({
    url: '/teacher/page',
    method: 'get',
    params
  })
}

export function getTeacherList() {
  return axios({
    url: '/teacher/list',
    method: 'get'
  })
}

export function createTeacher(data) {
  return axios({
    url: '/teacher',
    method: 'post',
    data
  })
}

export function updateTeacher(data) {
  return axios({
    url: '/teacher/update',
    method: 'post',
    data
  })
}

export function deleteTeacherById(id) {
  return axios({
    url: '/teacher/del_' + id,
    method: 'get'
  })
}

export function getTeacherByCourseId(id) {
  return axios({
    url: '/teacher/course/' + id,
    method: 'get'
  })
}
